<%@ page contentType="text/html;charset=UTF-8" language="java"  pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt_rt" %>
<%@ taglib prefix="ssm" uri="http://ssm.elangzhi.com/jsp/tag/functions" %>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%--
Created by GaoXiang
Date: 2019-08-08 15:07:16 星期四
Version: 1.0
订单列表
--%>

<!DOCTYPE html>
<!--[if IE 8]> <html lang="zh" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="zh" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="zh">
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
    <meta charset="utf-8"/>
    <title>订单管理 - 后台服务中心</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="width=device-width, initial-scale=1" name="viewport"/>
    <meta content="订单管理列表" name="description"/>
    <meta content="GaoXiang" name="author"/>
    <jsp:include page="../body/link-page.jsp"/>
</head>
<!-- END HEAD -->
<body class="page-content-white  fade-in-up">

<!-- BEGIN CONTAINER -->
<div class="page-container">


    <!-- BEGIN PAGE TOOLS-->
    <!--查询条件示例 使用时取消hide样式-->
    <div class="portlet light ">
        <div class="portlet-title">
            <div class="caption">
                <i class="icon-paper-plane font-green-haze"></i>
                <span class="caption-subject bold font-green-haze uppercase">搜索</span>
                <span class="caption-helper">点击右侧搜索按钮开始检索</span>
            </div>
            <div class="tools">
                <a href="javascript:void(0);" class="collapse" data-original-title="收起" title="收起"></a>
                <a href="javascript:void(0);" class="fullscreen" data-original-title="全屏" title="全屏"></a>
            </div>
        </div>
        <div class="portlet-body">
            <div class="form-inline" role="form" id="table-param">

                <div class="form-group form-md-line-input has-success">
                    <input type="text" class="form-control" name="parkName" value="${parkName}" autofocus placeholder="停车场名称">
                    <div class="form-control-focus"></div>
                </div>

                <div class="form-group form-md-line-input has-success">
                    <input type="text" class="form-control" name="orderCode" value="${orderCode}" autofocus placeholder="订单编号">
                    <div class="form-control-focus"></div>
                </div>

                <div class="form-group form-md-line-input has-success">
                    <input type="text" class="form-control" name="plateNo" value="${plateNo}"  autofocus placeholder="请输入车牌号">
                    <div class="form-control-focus"></div>
                </div>

                <div class="form-group form-md-line-input has-success">
                    <input type="text" class="form-control bs-date" name="enterTime" value="${enterTime}" placeholder="入场时间">
                    <div class="form-control-focus"></div>
                </div>

                <div class="form-group form-md-line-input has-success">
                    <input type="text" class="form-control bs-date" name="leaveTime" value="${leaveTime}" placeholder="出场时间">
                    <div class="form-control-focus"></div>
                </div>

                <div class="form-group form-md-line-input has-success">
                    <select class="form-control" name="orderStatus">
                        <option value="">订单状态</option>
                        <option value="1">已支付</option>
                        <option value="0">未支付</option>
                        <option value="2">逃缴</option>
                    </select>
                    <div class="form-control-focus"></div>
                </div>

                <button class="btn btn-success btn-tools-search"><i class="icon-magnifier"></i> 搜索</button>
                <button class="btn btn-danger btn-tools-reset" data-url-param="&page=1&size=10"><i class="icon-reload"></i> 重置
                </button>
            </div>
        </div>
    </div>
    <!-- END PAGE TOOLS-->

    <!-- BEGIN PAGE TABLE-->
    <div class="portlet light">
        <div class="portlet-title">
            <div class="caption">
                <i class="icon-speech  font-blue-hoki"></i>
                <span class="caption-subject font-blue-hoki">数据表</span>
                <span class="caption-helper">
                    当前查询条件下有：<span class="show-page-total">${pageInfo.total}</span> 条数据，
                    总计：<span class="show-page-count">${pageInfo.pages}</span> 页，
                    当前显示第：<span class="show-page-current">${pageInfo.pageNum}</span> 页，
                    首行为第：<span class="show-page-begin">${(pageInfo.pageNum - 1) * pageInfo.pageSize + 1}</span> 条数据。
                </span>
            </div>

            <div class="tools">
                <a href="" class="collapse" data-original-title="" title=""> </a>
                <a href="" class="reload btn-tools-refresh" data-original-title="" title=""> </a>
                <a href="" class="fullscreen" data-original-title="" title=""> </a>
            </div>

        </div>
        <div class="table-toolbar hide">
            <div class="row">
                <div class="col-md-6">

                    <div class="btn-group">
                        <shiro:hasPermission name="order:add">
                        <a href="javascript:void(0);" class="btn green btn-module-add">
                            添加 <i class="fa fa-plus"></i>
                        </a>
                        </shiro:hasPermission>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="btn-group pull-right">
                        <shiro:hasPermission name="order:delete">
                        <button class="btn btn-danger btn-module-delete-all"> 批量删除 <i class="fa fa-times"></i></button>
                        </shiro:hasPermission>
                    </div>
                </div>
            </div>
        </div>
        <div class="portlet-body table-responsive">
            <div class="table-scrollable">
                <table data-current-page="${pageInfo.pageNum}" data-page-size="${pageInfo.pageSize}"
                       data-total-counts="${pageInfo.total}" data-page-counts="${pageInfo.pages}"
                       data-visible-pages="10" class="table table-bordered table-hover" id="table">
                    <thead>
                    <tr>
                        <th class="table-checkbox">
                            <label class="mt-checkbox mt-checkbox-single mt-checkbox-outline">
                                <input type="checkbox" class="checkbox-all" title="全选"><span></span>
                            </label>
                        </th>
                        <th>停车场名称</th>
                        <th>订单编号</th>
                        <th>入场时间</th>
                        <th>离场时间</th>
                        <th>停车时长</th>
                        <th>车牌号</th>
                        <%--<th>车牌颜色</th>--%>
                        <th>车辆类型</th>
                        <th>订单费用</th>
                        <th>订单状态</th>
                        <th>支付方式</th>
                        <th>手持机编号</th>
                        <th>收费员</th>
                        <th>支付时间</th>
                    </tr>
                    </thead>
                    <tbody>
                    <c:forEach var="item" items="${pageInfo.list}" varStatus="status">
                        <tr>
                            <td class="center">
                                <label class="mt-checkbox mt-checkbox-single mt-checkbox-outline">
                                    <input type="checkbox" class="checkbox-child" title="选择此条数据" value="${item.id}"><span></span>
                                </label>
                            </td>
                            <td>${item.parkName}</td>
                            <td>${item.orderCode}</td>
                            <td>${ssm:dateToStringTime(item.enterTime)}</td>
                            <td>${ssm:dateToStringTime(item.leaveTime)}</td>
                            <td>${item.parkPeriodTime}</td>
                            <td>${item.plateNo}</td>
                           <%-- <td>${item.plateColor}</td>--%>
                            <td>
                                <c:if test="${item.carType == '0'}">其他</c:if>
                                <c:if test="${item.carType == '1'}">小车</c:if>
                                <c:if test="${item.carType == '2'}">大车</c:if>
                            </td>
                            <td>${item.orderMoney}</td>
                            <td>
                                <c:if test="${item.orderStatus == 0}">未支付</c:if>
                                <c:if test="${item.orderStatus == 1}">已支付</c:if>
                                <c:if test="${item.orderStatus == 2}">逃缴</c:if>
                            </td>
                            <td>
                                <c:if test="${item.payType == 0}">支付宝</c:if>
                                <c:if test="${item.payType == 1}">微信支付</c:if>
                                <c:if test="${item.payType == 2}">余额支付</c:if>
                                <c:if test="${item.payType == 3}">现金支付</c:if>
                                <c:if test="${item.payType == 4}">场内支付</c:if>
                            </td>
                            <td>${item.sbCode}</td>
                            <td>${item.managerName}</td>
                            <td>${ssm:dateToStringTime(item.payTime)}</td>
                        </tr>
                    </c:forEach>
                    </tbody>
                </table>
            </div>
            <ul class="pagination">
                <li>
                    <select class="form-control" id="pageSize">
                        <optgroup label="每页显示行数"></optgroup>
                        <option ${pageInfo.pageSize==3?"selected":""} value="3">3</option>
                        <option ${pageInfo.pageSize==5?"selected":""} value="5">5</option>
                        <option ${pageInfo.pageSize==10?"selected":""} value="10">10</option>
                        <option ${pageInfo.pageSize==20?"selected":""} value="20">20</option>
                        <option ${pageInfo.pageSize==50?"selected":""} value="50">50</option>
                        <option ${pageInfo.pages==pageInfo.total?"selected":""} value="${pageInfo.total}">全部</option>
                    </select>
                </li>
            </ul>
            <ul class="pagination" id="pagination"></ul>
        </div>
    </div>
    <!-- END PAGE TABLE-->
</div>
<!-- END CONTAINER -->

<!-- BEGIN PAGE JAVASCRIPT-->
<jsp:include page="../body/javascript-page.jsp"/>
<script>

    $(document).ready(function () {

        //初始化页面
        initList({
            table: "table",                                                 //表格ID
            url: "/order/list",                                      //表格分页url
            ajax: true                                                      //为true时伪静态刷新指定ID的table
        });

    });

    $('.bs-date').datetimepicker({
        language: 'zh-CN',
        minView: "month",//设置只显示到月份
        format: 'yyyy/mm/dd',
        autoclose: true,
        todayBtn: true,
        todayHighlight:true,
    });


</script>
<!-- END PAGE JAVASCRIPT-->
</body>
</html>
